package io.github.yuegod.clean.acl.api;

import io.github.yuegod.clean.acl.enumeration.ApiType;

import java.util.HashMap;
import java.util.Map;

/**
 * @author quziwei
 * @date 2021/8/5 9:02
 **/
public class ApiFactory {

    private static final Map<ApiType, Api> API_FACTORY = new HashMap<>();

    public static void setApiFactory(ApiType apiType, Api api) {
        API_FACTORY.put(apiType, api);
    }

    public static Api getApi(ApiType apiType) {
        return API_FACTORY.get(apiType);
    }
}
